<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html,body{
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        #app{
            width: 100%;
            height: 100%;
            padding: 30px;
        }
        .main-header{
            position: fixed;
            top: 0;
            width: 100%;
            height: 50px;
            background-color: #fff;
            z-index: 999;
        }
        .main-content{
            width: 100%;
            height: 100%;
            padding-top: 50px;
            display: flex;
        }
        .main-content .content-component{
            width: 220px;

        }
        .main-content .content-canvas{
            flex: 1;
        }
        .main-content .content-source{
            width: 220px;
        }
        .item{
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }
        #canvas{
            width: 100%;
            height: 100%;
        }
    </style>
<!--    <script src="https://cdn.jsdelivr.net/npm/interactjs/dist/interact.min.js"></script>-->
</head>
<body>
    <div id="app">
<!--        <div class="main-header"></div>-->
<!--        <div class="main-content">-->
<!--            <div class="content-component"></div>-->
<!--            <div class="content-canvas">-->
<!--                <div class="item"></div>-->
<!--            </div>-->
<!--            <div class="content-source"></div>-->
<!--        </div>-->
        <svg version="1.1"
             baseProfile="full"
             width="100%" height="100%"
             xmlns="http://www.w3.org/2000/svg">

            <rect width="100%" height="100%" fill="#f0f0f0" />

            <circle cx="150" cy="100" r="80" fill="green" />

            <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>
        </svg>
    </div>

</body>
<script>
    function def (obj, key) {
        Object.defineProperty(obj, key, {
            writable: true,
            enumerable: true,
            configurable: true,
            value: function(...args) {
                console.log('key', key);
                console.log('args', args);
            }
        });
    }

    // 重写的数组方法
    let obj = {
        push() {}
    }

    // 数组方法的绑定
    def(obj, 'push');

    obj.push('1');

</script>
</html>